home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: MegaDisc
/
MegaDisc 06 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].zip
/
MegaDisc 06 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].adf
/
ARTICLES
/
FileBasics
< prev
next >
Wrap
Text File
|
1988-03-28
|
5KB
|
151 lines
Help For Chopping, Hunkpadding, Squeezing, Unsqueezing, and
Archiving Your Files.
By Stephen Pietrowicz (DR RITZ)
and
Harv Laser (CBM*HARV)
People Link
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ED. NOTE: This covers most of the more exotic Communications programs
and what to do with them. Anyone interested can get AMICUS#17 which
has most of them, along with a number of good communications terminal
programs. Check out the COMMSPROTOCOLS article by Ross Kellaway, sysop
of CLUB AMIGA BBS [ (02) 5216338 ] for further information on
Communications in general.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Chopping Files
--------------
The Xmodem protocol transmits data in 128 bytes "chunks". When a file
is uploaded using the Xmodem protocol, Xmodem automatically pads the file
with null characters. These characters must be stripped from executable
files in order for the Amiga to recognize the file. (If you don't strip
the characters, you'll get the message "Not an Object file").
Files that need to be chopped normally include in their description
what the exact byte count the program must be.
There are several utilities located in the library to chop your files to
the correct length:
File Format Needs byte count? Description
------------------------------------------------------------------------
Chop.msb AmigaBasic Yes Prompts for files and count
Trunc Executable Yes Trunc <orig> <dest> <bytes>
FixObj Executable No FixObj <orig> <dest>
Chop.Exe Executable Yes Chop <orig> <dest> <bytes>
Comm Executable No Terminal Program
Where:
<orig> is what you called your downloaded file
<dest> is what you want your chopped file to be called
<bytes> is the count of how much the file should be chopped (in
bytes)
Since FixObj is an intelligent chop program, you don't have to specify the
correct byte count on your disk.
There are several terminal programs that automatically chop your files as
they are being downloaded. We recommend that you use the "Comm" series of
terminal programs written by DJJAMES. It is one of the more advanced public
domain terminal programs, and has many features.
HunkPad
-------
FORMAT: HunkPad <obj>
Where: <obj> is the name of the file to hunkpad.
In an effort to eliminate having to chop your downloads, a program called
HunkPad "fixes" files before they are uploaded. It adds the correct number
of bytes to a file to make the total byte count divisible by 128. Since
Xmodem transmits 128 bytes per "chunk", no extra bytes will be added the
xmodem upload once you HunkPad it.
Squeezing and Unsqueezing
-------------------------
SQ -- Compact a file
FORMAT: SQ <exe1>
Where: <exe1> is the file you want to squeeze
When a file is squeezed using SQ, a new file is created, with a "q"
somewhere in it's name. For example, when the file PLINK.TXT is squeezed,
a new file is created, and is called: PLINK.TQT. This helps identify
squeezed programs.
USQ -- Un-compact a file
FORMAT: USQ <exe2>
Where: <exe2> is the file you want to un-squeeze
USQ is used to un-squeeze your compacted files. It doesn't matter what
you call the program when you download it to your system. The correct file
name is automatically saved when the program is squeezed. USQing a file
creates a new file on your disk.
Archives
--------
The most preferred format is ARC format. Archives contain the best of
both worlds: They are always a multiple of 128, so they don't have to be
chopped, and they automatically compact files.
The archive program has a built in help command; all you have to type is
the name of the archiver, and it will list the commands that you can use.
The following are a few of the most frequently used commands:
----
Archive Command: a -- adds (creates) files to an archive
FORMAT: ARC a <name> <file1> <file2> ... <filen>
Where: <name> is the name of the archive you want to add files to. If
the archive doesn't exist, ARC automatically creates it.
<file1><file2>...<filen> are the names of the files to add.
----
Archive Command: e -- extract files from an archive
FORMAT: ARC e <name>
Where: <name> is the name of the archive you are extracting files from.
It's generally a good idea to list the contents of an
archive to find out the size of the extracted files to
make sure that you have enough room on the disk.
----
Archive Command: v -- list the contents of an archive
FORMAT: ARC v <name>
Where: <name> is the name of the archive.
ARCing is the preferred method of storing files. Most popular
computers, such as the IBM-PC and compatibles, don't care about Xmodem
padding, on downloads... however Amiga is different... Xmodem padding
on executable files is significant, and can cause you problems unless
you are aware of the problem and its solutions.
DR RITZ (Steve)
CBM*HARV (Harv)
~~~~~~~~~~~~~~~~~~~~~~~~~~ END OF FILEBASICS ~~~~~~~~~~~~~~~~~~~~~~~~~~